<template>
    <div class="box">
        <h2>标题：超级好吃的棒棒糖</h2>
        <p>价格：{{price}}元</p>
        <p>开业大酬宾，全场骨折</p>
        <button @click="reduce">砍价</button>
    </div>
</template>

<script>
export default {
    data(){
        return  {
            price:18.8
        }
    }
    ,
    methods:{
        reduce(){
            this.price-=1
            this.$emit('spread',this.price)
        }
    }
}
</script>

<style>
.box{
    border: 1px solid #000;
}
</style>